In model
class department(osv.osv):
_name = 'department'
_columns = {
'name': fields.char('Department', size=32, required=True),
}
class djelatnik(osv.osv):
_name = 'employee'
_columns = {
'name': fields.char('name',size=30, required=True, help='name'),
'surname': fields.char('surname', size=30, required=True, help='surname'),
'odjel': fields.many2one('department' ,'Departments')
}
in view
employee.form
employee
form
employee.tree
employee
tree
employee
employee
form
tree,form
{"search_default_type_date":0}
department.form
department
form
department.tree
department
tree
department
department
form
tree,form